<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
	<title>“组团啦”杯登录</title>
	<link rel="stylesheet" href="__PUBLIC__/match/css/iconfont.css" />
	<link rel="stylesheet" href="__PUBLIC__/match/css/reset.css" />
	<link rel="stylesheet" href="__PUBLIC__/match/css/public.css" />
</head>
<body>
<section id="top-space"></section>
<div id="login-scroll-part">
	<div id="z-logo" class="center-block"><img src="__PUBLIC__/match/img/logo.png" alt="" width="100%"/></div>
	<form action="" id="login-form" method="post">
		<div class="input-wrapper center-block">
			<input type="text" name="phone" id="phone" placeholder="账号"/>
			<span class="icon-username"></span>
		</div>
		<div class="input-wrapper center-block">
			<input type="password" id="password" name="password" placeholder="密码"/>
			<span class="icon-password"></span>
		</div>
		<p>忘记密码请联系组团啦官方</p>
		<button class="btn-normal">登录</button>
	</form>

</div>
<script src="__PUBLIC__/match/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__PUBLIC__/js/jquery.validate.min.js"/>
<script src="__PUBLIC__/match/js/public.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

	$(function(){
		$("#login-form").validate({
			submitHandler:function(){
				var form = $("#login-form");
				var phone = $("#phone").val();
				if(phone==""){
					alert("请输入手机号");
					return;
				}
				var pwd = $("#password");
				if(pwd==""){
					alert("请输入密码");
					return;
				}
				$.ajax({
					url:form.attr("action"),
					type:"post",
					dateType:"json",
					data:form.serialize(),
					success:function(data){
						if(data.status==0){
							alert(data.info);
						}
						else{
							location.href=data.url;
						}
					}
				})
			}
		})
	})


</script>
</body>
</html>
